package com.ruoyi.employee.mapper;

import java.util.Date;
import java.util.List;

import com.ruoyi.employee.domain.Departments;
import com.ruoyi.employee.domain.Employee;
import com.ruoyi.employee.domain.Socialsecurity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 员工信息Mapper接口
 * 
 * @author Mr.阚
 * @date 2025-02-25
 */
public interface EmployeeMapper 
{
    /**
     * 查询员工信息
     * 
     * @param id 员工信息主键
     * @return 员工信息
     */
    public Employee selectEmployeeById(Long id);

    /**
     * 查询员工信息列表
     * 
     * @param employee 员工信息
     * @return 员工信息集合
     */
    public List<Employee> selectEmployeeList(Employee employee);

    /**
     * 新增员工信息
     * 
     * @param employee 员工信息
     * @return 结果
     */
    public int insertEmployee(Employee employee);

    /**
     * 修改员工信息
     * 
     * @param employee 员工信息
     * @return 结果
     */
    public int updateEmployee(Employee employee);

    /**
     * 删除员工信息
     * 
     * @param id 员工信息主键
     * @return 结果
     */
    public int deleteEmployeeById(Long id);

    /**
     * 批量删除员工信息
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteEmployeeByIds(Long[] ids);

    /**
     * 批量删除五险一金
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSocialsecurityByAccountSetsIds(Long[] ids);
    
    /**
     * 批量新增五险一金
     * 
     * @param socialsecurityList 五险一金列表
     * @return 结果
     */
    public int batchSocialsecurity(List<Socialsecurity> socialsecurityList);
    

    /**
     * 通过员工信息主键删除五险一金信息
     * 
     * @param id 员工信息ID
     * @return 结果
     */
    public int deleteSocialsecurityByAccountSetsId(Long id);




    int updateAccrualSubjectById(@Param("ids") List<Long> ids,@Param("accrualsubject") String accrualsubject);


//添加部门
    @Insert("insert into departments (departmentName,departmentId,principal,cellphone,createBy,createTime) values (#{departmentName},#{departmentId},#{principal},#{cellphone},#{createBy},#{createTime})")
    int addDepartments(Departments departments);

    int batchLeave(@Param("ids") List<Long> ids);
}
